<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>
<form action="reply_edit" method="post" class="pageForm required-validate"
      onsubmit="return validateCallback(this, dialogAjaxDone)">
    <input type="hidden" name="id" readonly="readonly" value="${list.id}" />
    <input type="hidden" name="image" class="logo" value="" />
    <div class="pageContent">
        <table class="table" width="100%" layoutH="137">
            <br>
            <div style="position: relative;"p>
                <label style="width:60px;float: left;">心声内容：</label>
                <textarea style="font-size: 12px;float: left;" class="textInput" cols="110" rows="11">${list.content}</textarea>
            </div>
            <div style="float: left;margin-top: 10px;">
                <label style="width:60px;float: left;">回复：</label>
                <label>
                <textarea style="font-size: 12px;float: left;" class="editor" cols="110" rows="14" name="reply">${list.reply}</textarea>
                </label>
            </div>
            <table width="100%">
                <tr class="text-normal">
                    <td>
                    <label style="width:60px;float: left;">图片：</label>
                    <div class="image-logo">
                        <c:if test="${!empty list.image}">
                            <img src="${list.image}" class="imgList">
                        </c:if>
                        <c:if test="${empty list.image}">
                            <img src="${app:getLocalUrl() }/assets/ext/js/uploadify/add_img.png" class="imgList">
                        </c:if>
                        <input type="file" onchange="upload(0)" class="imgFile"/>
                    </div>
                    </td>
                </tr>
            </table>

        </table>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent" style="text-align: center;">
                            <button type="submit">处理</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</form>
<script src="../../../assets/upload/upload.js"></script>
<script>
    function upload(index) {
        uploadImage(index,$('.imgFile').eq(index).get(0).files[0]);
    }

    // 设置图片地址
    function setImage(index,url) {
        $('.imgList').eq(index).attr('src',url);
        $('.logo').eq(index).val(url);
    }
</script>